Non-destructive tests are the most important and efficient tests for checking welded objects. Non-destructive tests are used to identify defects in the internal and external parts of welded objects, that focus on identifying defects of the parts without damaging them. In this article, the industrial radiography method, which is one of the non-destructive methods, is used to detect surface and subsurface welding defects such as cracks, holes, corrosion, etc. In the radiography method due to the inherent scattering of X-rays, noises from the X-ray machine, attenuation of the beam in the examined object, geometrical factors such as the size of the radiation source, the thickness of the part and the distance between the source and the film, etc., the resulting images may lack clarity. Despite these factors, the quality of radiographs is low, and it is difficult to accurately interpret the results and identify the welding defects. Therefore, Image processing methods are used as an auxiliary tool to increase contrast and improve the interpretation of radiographs. In this article, the aim is to increase the quality of welding radiographs using the iterative weighted median filter, which is a part of spatial domain filters. The background image of the original radiograph is obtained by applying the iterative weighted median filter with a same number of repetitions and the different 3D windows. Then, the background image obtained is subtracted from the original radiograph, reconstructed images are obtained with high contrast. The results show that the application of this filter on the 3D radiographs of the weld better reveals the defects hidden in the radiographs of the weld, including small and subsurface cracks. Also, the expert's evaluation shows that the reconstructed images have a contrast improvement between 5 and 16% in terms of contrast, and they define the defect regions with better and more accurate resolution.